<?php
namespace App\Models;

use App\Exceptions\ApiException;
use Illuminate\Support\Facades\DB;

class ManageMessage extends CommonModel {
	protected $table = 'manage_message';

	public static function send($send_uid,$uid,$send_id,$village_id,$content){
	    $input = array(
	        'uid'=>$uid,
            'send_uid'=>$send_uid,
            'send_id'=>$send_id,
            'village_id'=>$village_id,
        );
	    $id = static::create($input)->id;
	    Message::message_push($uid,'manage_message',$content,$id);
	    return true;
    }
}